#ifndef GENOMEELEMENTDATAPACKET_H
#define GENOMEELEMENTDATAPACKET_H

#include <QObject>
#include <QString>
#include <QDebug>

/**GenomeElementDataPacket class.
  * The essential purpose of this class is to encapsulate data about genome elements,
  * keeping the data separate from the representation of the data.
  *
  * This base class contains the minimal info necessary to display genome elements in the MultiGeneRegionVisWidget.
  * Other classes can inherit from this and add extra information, depending on the data source
  *
  * I believe this will be useful for the following reasons:
  *     1) Reading from the data files, and capturing the data to display, can happen independently of GUI object creation.
  *         GUI objects can only be 'newed' in the main thread, while data can be captured on separate threads, so I think this will be
  *         faster.
  *     2) Different data sources will potentially have different information to store and display.
  *         I can later create a base data packet class that stores just the essential info for display in a genome viewer, and have
  *         Special data packet classes for different data sources.
  *     3) Duplication of GenomeElements need not produce duplication of data for those elements.  This is not useful yet, but may be
  *         at some point down the line.
*/
class GenomeElementDataPacket : public QObject //NOTE:  maybe remove QObject ... not sure I need it
{
    Q_OBJECT
public:
    explicit GenomeElementDataPacket(QObject *parent = 0);
    explicit GenomeElementDataPacket( QString seqId, QString source, QString type, int start, int stop, bool posStrand,
                                      QString parentContigId, bool hasCluster, QString clusterId,
                                      bool hasSpecies, QString species, QObject *parent = 0);

    //SETTERS
    void setAll( QString seqId, QString source, QString type, int start, int stop, bool posStrand,
                 QString parentContigId, bool hasCluster, QString clusterId,
                 bool hasSpecies, QString species);

    void setSeqId( QString seqId );
    void setSource( QString source );
    void setType( QString type );
    void setStart( int start );
    void setStop( int stop );
    void setPosStrand( bool posStrand );
    void setParentContigId( QString parentContigId );
    void setHasCluster(bool hasCluster );
    void setClusterId( QString clusterId );
    void setHasSpecies( bool hasSpecies );
    void setSpecies( QString species );

    //GETTERS
    QString getSeqId( );
    QString getSource( );
    QString getType( );
    int getStart( );
    int getStop( );
    bool getPosStrand( );
    QString getParentContigId( );
    bool getHasCluster( );
    QString getClusterId( );
    bool getHasSpecies( );
    QString getSpecies( );

    //GETTERS FOR DISPLAY
    virtual QString getIdentifierToDisplay();

    //NEED FOR VIS
    bool matchSearchString(QString searchString);
    virtual QString getDataToDisplay();

//    virtual QString toAddQuery();

    //FOR DEBUGGING
    virtual QString toString();

    virtual QString getUniqueId();

signals:
    
public slots:

protected:
    QString seqId;
    QString source;
    QString type;
    int start;
    int stop;
    bool posStrand;
    QString parentContigId;
    bool hasCluster;
    QString clusterId;
    bool hasSpecies;
    QString species;
};

#endif // GENOMEELEMENTDATAPACKET_H
